Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@boost/plugin

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@boost/plugin

Plugin based architecture that supports module loading, custom types, registries, scopes, and more.

  • 3.0.4
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Plugins - Boost

Build Status npm version npm deps

Plugin based architecture that supports module loading, custom types, registries, scopes, and more.

import { Registry, Pluggable } from '@boost/plugin';

export interface Renderable<T> extends Pluggable<T> {
	render(): string | Promise<string>;
}

const registry = new Registry<Renderable>('boost', 'plugin', {
	validate(plugin) {
		if (typeof plugin.render !== 'function') {
			throw new TypeError('Plugins require a `render()` method.');
		}
	},
});

const plugin = await registry.load('boost-plugin-example');

Features

  • Custom plugin types and registries.
  • Node module, file path, and configuration file loading strategies.
  • Multiple module name formats: public, scoped public, scoped private.
  • Structural contracts with life cycle events.
  • Factory function pattern for plugin creation.
  • Asynchronous by default.

Installation

yarn add @boost/plugin

Documentation

Keywords

FAQs

Package last updated on 29 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc